New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use option-validator in preset-typescript #12347
refactor: use option-validator in preset-typescript #12347
Conversation
@@ -29,12 +29,6 @@ export default declare((api, opts) => { | |||
const development = !!opts.development; | |||
const useBuiltIns = !!opts.useBuiltIns; | |||
|
|||
if (typeof development !== "boolean") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch is unreachable, we have cast development
to boolean by double negation above.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/32474/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: Disable whitespace changes when reviewing
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4c023d8:
|
@babel/preset-typescript
now depends on@babel/helper-validator-option
This PR is extracted from #10927. It targets to current
main
.In another PR, I plan to re-introduce #10927 behind a flag (tentatively named as
BABEL_8_PRESET_OPTION_CHECK
) like we did in #11172, so it is non-breaking change (not if you randomly assignBABEL_8_*
env in your CI) and we can merge without holding off for a long while.